Integrand size = 23, antiderivative size = 82 \[ \int \frac {A+B \sec (c+d x)}{\sqrt {b \sec (c+d x)}} \, dx=\frac {2 A E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 B \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{b d} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3872, 3856, 2719, 2720} \[ \int \frac {A+B \sec (c+d x)}{\sqrt {b \sec (c+d x)}} \, dx=\frac {2 A E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 B \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{b d} \]
[In]
[Out]
Rule 2719
Rule 2720
Rule 3856
Rule 3872
Rubi steps \begin{align*} \text {integral}& = A \int \frac {1}{\sqrt {b \sec (c+d x)}} \, dx+\frac {B \int \sqrt {b \sec (c+d x)} \, dx}{b} \\ & = \frac {A \int \sqrt {\cos (c+d x)} \, dx}{\sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {\left (B \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{b} \\ & = \frac {2 A E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 B \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{b d} \\ \end{align*}
Time = 0.32 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.66 \[ \int \frac {A+B \sec (c+d x)}{\sqrt {b \sec (c+d x)}} \, dx=\frac {2 \left (A E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+B \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )\right )}{d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}} \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 17.62 (sec) , antiderivative size = 408, normalized size of antiderivative = 4.98
method | result | size |
risch | \(-\frac {i A \sqrt {2}}{d \sqrt {\frac {b \,{\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}}-\frac {i \left (\frac {i B \sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}\, \sqrt {2}\, \sqrt {i \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}\, \sqrt {i {\mathrm e}^{i \left (d x +c \right )}}\, \operatorname {EllipticF}\left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )}{\sqrt {b \,{\mathrm e}^{3 i \left (d x +c \right )}+b \,{\mathrm e}^{i \left (d x +c \right )}}}+A \left (-\frac {2 \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+b \right )}{b \sqrt {{\mathrm e}^{i \left (d x +c \right )} \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+b \right )}}+\frac {i \sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}\, \sqrt {2}\, \sqrt {i \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}\, \sqrt {i {\mathrm e}^{i \left (d x +c \right )}}\, \left (-2 i \operatorname {EllipticE}\left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )+i \operatorname {EllipticF}\left (\sqrt {-i \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}, \frac {\sqrt {2}}{2}\right )\right )}{\sqrt {b \,{\mathrm e}^{3 i \left (d x +c \right )}+b \,{\mathrm e}^{i \left (d x +c \right )}}}\right )\right ) \sqrt {2}\, \sqrt {b \,{\mathrm e}^{i \left (d x +c \right )} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}}{d \sqrt {\frac {b \,{\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}}\, \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}\) | \(408\) |
parts | \(\frac {2 A \left (i \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \cos \left (d x +c \right )-i \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \cos \left (d x +c \right )+2 i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )-2 i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )+i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sec \left (d x +c \right )-i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sec \left (d x +c \right )+\sin \left (d x +c \right )\right )}{d \left (\cos \left (d x +c \right )+1\right ) \sqrt {b \sec \left (d x +c \right )}}-\frac {2 i B \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )}{d \sqrt {b \sec \left (d x +c \right )}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}\) | \(458\) |
default | \(\frac {2 i A \sqrt {\left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1\right ) \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )}\, \sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1}\, \sqrt {-\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )-2 i A \sqrt {\left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1\right ) \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )}\, \sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1}\, \sqrt {-\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1}\, \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )+2 i B \sqrt {\left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1\right ) \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )}\, \sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1}\, \sqrt {-\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )+2 A \sqrt {\left (1-\cos \left (d x +c \right )\right )^{4} \csc \left (d x +c \right )^{4}-1}\, \left (1-\cos \left (d x +c \right )\right )^{3} \csc \left (d x +c \right )^{3}-2 A \sqrt {\left (1-\cos \left (d x +c \right )\right )^{4} \csc \left (d x +c \right )^{4}-1}\, \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{d \sqrt {\left (1-\cos \left (d x +c \right )\right )^{4} \csc \left (d x +c \right )^{4}-1}\, \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right ) \sqrt {-\frac {\left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}+1\right ) b}{\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}}}\) | \(575\) |
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.09 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.49 \[ \int \frac {A+B \sec (c+d x)}{\sqrt {b \sec (c+d x)}} \, dx=\frac {-i \, \sqrt {2} B \sqrt {b} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + i \, \sqrt {2} B \sqrt {b} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + i \, \sqrt {2} A \sqrt {b} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - i \, \sqrt {2} A \sqrt {b} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{b d} \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)}{\sqrt {b \sec (c+d x)}} \, dx=\int \frac {A + B \sec {\left (c + d x \right )}}{\sqrt {b \sec {\left (c + d x \right )}}}\, dx \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)}{\sqrt {b \sec (c+d x)}} \, dx=\int { \frac {B \sec \left (d x + c\right ) + A}{\sqrt {b \sec \left (d x + c\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)}{\sqrt {b \sec (c+d x)}} \, dx=\int { \frac {B \sec \left (d x + c\right ) + A}{\sqrt {b \sec \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {A+B \sec (c+d x)}{\sqrt {b \sec (c+d x)}} \, dx=\int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}}{\sqrt {\frac {b}{\cos \left (c+d\,x\right )}}} \,d x \]
[In]
[Out]